package org.zhouhe.util;

import java.sql.Types;

import org.hibernate.Hibernate;
import org.hibernate.dialect.MySQL5InnoDBDialect;
import org.hibernate.dialect.function.StandardSQLFunction;

public class MYSQLDialect extends MySQL5InnoDBDialect {
	public MYSQLDialect() {
		super();
		registerHibernateType(Types.DECIMAL, Hibernate.BIG_DECIMAL.getName());
		registerHibernateType(Types.LONGVARCHAR, Hibernate.TEXT.getName());
		registerFunction("group_concat", new StandardSQLFunction("group_concat", Hibernate.STRING));
	}
}